import http from "./index.ts"

const page = (params: any) => http.get("/file/page", {
    params: params
});

const upload = (dataFrom: any) => http.post("/file/save", dataFrom);


const deleteFile = (id: string) => http.delete("/file/" + id);

const updateFile = (dataFrom: any) => http.post("/file/settings", dataFrom)

const downloadFile = (params: any) => http.get("/file/export", {
    params: params,
    responseType: 'blob'
});

export {page, upload, deleteFile, updateFile, downloadFile}